import java.util.HashMap;
import java.util.Scanner;

public class Solution4 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str1= sc.nextLine();
        String str2=sc.nextLine();
        faultyKeyboard(str1,str2);
    }
    public static void faultyKeyboard(String str1,String str2){
        String str3=str1.toUpperCase();
        String str4=str2.toUpperCase();
        char[] str5=str3.toCharArray();
        char[] str6=str4.toCharArray();
        HashMap<Character,Integer> map1=new HashMap<>();
        HashMap<Character,Integer> map2=new HashMap<>();
        for (int i = 0; i < str6.length; i++) {
            if(map1.containsKey(str6[i])){
                map1.put(str6[i],map1.get(str6[i])+1);
            }else{
                map1.put(str6[i],1);
            }
        }
        for(int i=0;i<str5.length;i++){
            if(!map1.containsKey(str5[i])&&!map2.containsKey(str5[i])){
                map2.put(str5[i],1);
                System.out.print(str5[i]);
            }
        }
    }
}
